﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using LMS.Admin.Helper;

namespace LMS.Admin.Models.Channel
{
    public class ChannelOpenDaily: ModelBase
    {
        [DisplayCustom("GLS_003_CHANNEL")]
        public int ChannelID { get; set; }

        [DisplayCustom("GLS_003_OPEN_DATE")]
        public DateTime OpenDate { get; set; }

        [DisplayCustom("GLS_003_EIGH_PRIZE")]
        [Required(ErrorMessage = "Ban phai nhap ket qua cua giai 8")]
        [StringLength(2, ErrorMessage = "Giai 8 yeu cau phai du 2 chu so")]        
        public string LevelEighth { get; set; }

        [DisplayCustom("GLS_003_SEVEN_PRIZE")]
        [StringLength(3, ErrorMessage = "Giai 7 yeu cau phai du 3 chu so")]        
        public string LevelSeventh { get; set; }

        [DisplayCustom("GLS_003_SIX_PRIZE")]
        public string LevelSixth { get { return string.Format("{0},{1},{2}", this.LevelSixth1, this.LevelSixth2, this.LevelSixth3); } }
        
        [Required(ErrorMessage = "Ban phai nhap so thu nhat cua giai 6")]
        [StringLength(4, ErrorMessage = "Giai 6 yeu cau phai du 4 chu so")]        
        public string LevelSixth1 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu nhi cua giai 6")]
        [StringLength(4, ErrorMessage = "Giai 6 yeu cau phai du 4 chu so")]        
        public string LevelSixth2 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu ba cua giai 6")]
        [StringLength(4, ErrorMessage = "Giai 6 yeu cau phai du 4 chu so")]        
        public string LevelSixth3 { get; set; }

        [DisplayCustom("GLS_003_FIVE_PRIZE")]
        [StringLength(4, ErrorMessage = "Giai 5 yeu cau phai du 4 chu so")]        
        public string LevelFifth { get; set; }

        [DisplayCustom("GLS_003_FOUR_PRIZE")]
        public string LevelFourth
        {
            get
            {
                return string.Format("{0},{1},{2},{3},{4},{5},{6}", this.LevelFourth1, this.LevelFourth2, this.LevelFourth3,
                                        this.LevelFourth4, this.LevelFourth5, this.LevelFourth6, this.LevelFourth7);
            }
        }

        [Required(ErrorMessage = "Ban phai nhap so thu nhat cua giai 4")]
        [StringLength(5, ErrorMessage = "Giai 4 yeu cau phai du 5 chu so")]        
        public string LevelFourth1 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu nhi cua giai 4")]
        [StringLength(5, ErrorMessage = "Giai 4 yeu cau phai du 5 chu so")]        
        public string LevelFourth2 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu ba cua giai 4")]
        [StringLength(5, ErrorMessage = "Giai 4 yeu cau phai du 5 chu so")]        
        public string LevelFourth3 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu tu cua giai 4")]
        [StringLength(5, ErrorMessage = "Giai 4 yeu cau phai du 5 chu so")]        
        public string LevelFourth4 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu nam cua giai 4")]
        [StringLength(5, ErrorMessage = "Giai 4 yeu cau phai du 5 chu so")]        
        public string LevelFourth5 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu sau cua giai 4")]
        [StringLength(5, ErrorMessage = "Giai 4 yeu cau phai du 5 chu so")]        
        public string LevelFourth6 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu bay cua giai 4")]
        [StringLength(5, ErrorMessage = "Giai 4 yeu cau phai du 5 chu so")]        
        public string LevelFourth7 { get; set; }

        [DisplayCustom("GLS_003_THREE_PRIZE")]
        public string LevelThird { get { return string.Format("{0},{1}", this.LevelThird1, this.LevelThird2); } }

        [Required(ErrorMessage = "Ban phai nhap so thu nhat cua giai 3")]
        [StringLength(5, ErrorMessage = "Giai 3 yeu cau phai du 5 chu so")]        
        public string LevelThird1 { get; set; }

        [Required(ErrorMessage = "Ban phai nhap so thu nhi cua giai 3")]
        [StringLength(5, ErrorMessage = "Giai 3 yeu cau phai du 5 chu so")]        
        public string LevelThird2 { get; set; }

        [DisplayCustom("GLS_003_TWO_PRIZE")]
        [Required(ErrorMessage = "Ban phai nhap ket qua cua giai nhi")]
        [StringLength(5, ErrorMessage = "Giai nhi yeu cau phai du 5 chu so")]        
        public string LevelSecond { get; set; }

        [DisplayCustom("GLS_003_ONE_PRIZE")]
        [Required(ErrorMessage = "Ban phai nhap ket qua cua giai nhat")]
        [StringLength(5, ErrorMessage = "Giai nhat yeu cau phai du 5 chu so")]        
        public string LevelFirst { get; set; }

        [DisplayCustom("GLS_003_SPECIAL_PRIZE")]
        [Required(ErrorMessage = "Ban phai nhap ket qua cua giai dac biet")]
        [StringLength(6, ErrorMessage = "Giai dac biet yeu cau phai du 6 chu so")]        
        public string LevelSpecial { get; set; }        
    }
}